<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let depts = [
        {
            deptno:10,
            dname:'研发部',
            loc:'沈阳市'
        },{
            deptno:20,
            dname:'销售部',
            loc:'广州市'
        },{
            deptno:30,
            dname:'财务部',
            loc:'成都市'
        }
    ]

    for (let dept of depts) {
        console.log('部门编号：', dept.deptno);
        console.log('部门名称：', dept.dname);
        console.log('部门位置：', dept.loc);
        console.log('---')
    }
</script>
</body>
</html>